module.exports = {
  globals: {
    ga: true,
    chrome: true
  },
  // plugins: ["prettier"],
  root: true,
  env: {
    node: true
  },
  extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"],
  // extends: ["plugin:vue/vue3-essential", "eslint:recommended", "@vue/prettier"], // vue3
  parserOptions: {
    parser: "@babel/eslint-parser",
    // parser: "babel-eslint",
    requireConfigFile: "false",
    ecmaVersion: 2020,
    ecmaFeatures: {
      jsx: true
    },
    babelOptions: {
      configFile: "./babel.config.js"
    }
  },
  rules: {
    "prettier/prettier": "error",
    "no-console": process.env.NODE_ENV === "production" ? "off" : "off",
    "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
  },
  overrides: [
    {
      files: [
        "**/__tests__/*.{j,t}s?(x)",
        "**/tests/unit/**/*.spec.{j,t}s?(x)"
      ],
      env: {
        jest: true
      }
    }
  ]
};
